<template>
  <div class="dashboard-container">

    <div class="dashboard-text">

        <span v-if="role == 1">欢迎登录，{{name}}医生</span>
        <span v-if="role == 0">欢迎登录，{{name}}管理员</span>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  data(){

    return {
      role:'',

    }
  },
  created() {
    this.role = localStorage.getItem('role')

  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
